home *** CD-ROM | disk | FTP | other *** search
/ Technotools / Technotools (Chestnut CD-ROM)(1993).ISO / lang_c / ucturbo2 / window.h < prev    next >
Text File  |  1987-05-17  |  3KB  |  84 lines

  1. /*************************************************************************
  2.  *                         window.h                                      *
  3.  *                                                                       *
  4.  *    This header is to be used for all window functions and programs    *
  5.  *    using window functions.                                            *
  6.  *                                                                       *
  7.  *                      Copyright (c) 1987                               *
  8.  *                              by                                       *
  9.  *                       David A.  Miller                                *
  10.  *                       Unicorn Software                                *
  11.  *                                                                       *
  12.  *************************************************************************/
  13.  
  14.  
  15. struct WNDOW      {        /* --- window control block    ---    */
  16.     int    ulx;        /* upper left corner x coordinate    */
  17.     int    uly;        /* ditto y coordinate            */
  18.     int    xsize;        /* line width of inside of window    */
  19.     int    ysize;        /* number of lines inside of window    */
  20.     int    cx;        /* current cursor offset in window    */
  21.     int    cy;
  22.     int    xmargin;    /* x offset to be used in window    */ 
  23.     int    ymargin;    /* y offset to be used in window    */
  24.     int    atrib;        /* attribute to be used in window    */
  25.     int    *scrnsave;    /* pointer to screen save buffer */
  26.     int    oldx;        /* cursor position when window was    */
  27.     int    oldy;        /* opened (used for screen restore)    */
  28. } ;
  29.  
  30.  
  31.  
  32. struct  BRDER  {
  33.     int ul;        /* upper left corner character.        */
  34.     int ur;        /* upper right corner character.    */
  35.     int ll;        /* lower left corner character.        */
  36.     int lr;        /* lower right corner character.    */
  37.     int v;        /* vertical character.            */
  38.     int h;        /* Horizontal character.        */
  39.    int att;    /* Widow Attribute.           */
  40. } ;
  41.  
  42. #define WINDOW struct WNDOW
  43. #define BORDER struct BRDER
  44.  
  45. /**********************************************************************
  46.  *                   Define the keys for Key pad                      *
  47.  **********************************************************************/
  48.  
  49. /* A null always preceeds these codes        */
  50.  
  51. #define CUR_UP         72                      /* Cursor up key code             */
  52. #define CUR_DWN      80
  53. #define CUR_LEFT     75
  54. #define CUR_RIGHT     77
  55. #define HOME         71
  56. #define PG_UP         73
  57. #define PG_DWN         81
  58. #define END            79
  59. #define INSERT         82
  60. #define CENTER         76
  61. #define DELETE         83
  62.  
  63. /*********************************************************************
  64.  *  These are return codes in case the window overshoots its borders *
  65.  *     when a write to that window is attempted                         *
  66.  *********************************************************************/
  67.  
  68. #define LEFT_OF        0xC000
  69. #define RIGHT_OF       0xA000
  70. #define TOP_OF           0x9000
  71. #define BOTTOM_OF      0x8800
  72.  
  73. /*********************************************************************
  74.  *  Attributes if a monochrome monitor is used.                      *
  75.  *********************************************************************/
  76.  
  77. #define INVISIBLE    0x00
  78. #define NORMAL        0x01
  79. #define ULINE        0x21
  80. #define HLITE        0x0a
  81. #define REVERSE        0x70
  82. #define UL_HLITE    0x09
  83.  
  84.